Order Sitelet

Location in SDK: SDK\Samples\ASPNET\Order Sitelet

The primary goal of the Order Sitelet is to demonstrate how to allow users to create an order, as well as how to confirm and view the status of that order.

The Order Sitelet consists of a package file, which you unpack using Commerce Server Site Packager. The source code for the sitelet is included in this package. No modification of the source code is required to deploy the Order Sitelet to a server running Commerce Server 2002.

Best coding practices are maintained in this sample, and the code represents the prescribed method of using the object model.

ASP.NET-Based Order Sitelet Code Notes

Installing the ASP.NET-Based Order Sitelet

ASP.NET-Based Order Sitelet Code Notes

This sitelet demonstrates multilingual functionality. The following languages are supported: English, French, German, and Japanese. The sitelet sets the language character set in the Page_Init function in several ASPX pages using code such as the following:

_language = Request.QueryString["language"];
try {
     Thread.CurrentThread.CurrentCulture =    
            CultureInfo.CreateSpecificCulture(_language);
     Thread.CurrentThread.CurrentUICulture = 
            Thread.CurrentThread.CurrentCulture;
     }
catch (ArgumentException e) 
     {
     _language = "en-US";
     Thread.CurrentThread.CurrentCulture =  
            CultureInfo.CreateSpecificCulture(_language);
     Thread.CurrentThread.CurrentUICulture = 
            Thread.CurrentThread.CurrentCulture;
     }
Installing the ASP.NET-Based Order Sitelet

You unpack the Order Sitelet using Commerce Server Site Packager. The package file for the ASP version of the Order Sitelet is located in the following directory:

<drive>:\Program Files\Microsoft Commerce Server 2002\SDK\Samples\ASPNET\Order Sitelet\SDK-ORDERSITELET-ASPNET.PUP

Use the following procedure to install the Order Sitelet on one computer using the Quick mode in Site Packager.

Unpacking the ASP.NET-based Order Sitelet using the Custom unpack option and creating independent databases for each of the site resources is not recommended.

To unpack the Order Sitelet
  1. Using the Windows Explorer, navigate to the <drive>:\Program Files\Microsoft Commerce Server 2002\SDK\Samples\ASPNET\Order Sitelet directory.

  2. Double-click the SDK-ORDERSITELET-ASPNET.PUP icon.

  3. In the Unpack screen, select Quick Unpack, and then click Next.

  4. In the Quick Unpack screen, ensure that the SQL Server computer name is correct, add the SQL Server Login name and password, and then click Next.

  5. In the Profiling System screen, accept the defaults, and then click Next.

  6. In the second Profiling System screen, accept the defaults, and then click OK.

  7. After the unpackaging is complete, a dialog box appears with the message "Unpacking is complete!". Click Finish.

  8. Using Internet Explorer, in the Address box, type HTTP: //<ComputerName>/netOrderSitelet to run the sitelet.